		
	footer.init();
	header.init('搜索');
	app.ajax(
		'/Index/Index/search',
		null,
		function(res){
			if(res.code == 200){
				app.tpl($('.search-list'),'tpl-search-list',res);
				echo.init();
			}else{
				layer.msg(res.msg);
			}
		}
	);
	
	
	
window.onload = function(){
	
	$('body').on('click','.nation .load-more',function(){
		$(this).remove();
		$('.nation .mui-col-xs-6').removeClass('dN');
	});
	
	$('body').on('click','.brand-list .load-more',function(){
		$(this).remove();
		$('.brand-list .mui-col-xs-6').removeClass('dN');
	});
	
	$('body').on('click','.nation .mui-col-xs-6',function(){
		var ids = $(this).attr('data-id');
		var name = $(this).attr('data-catname');
		app.open('nationClassify.html','nationClassify',{id : ids},window.location.href,document.body.scrollTop);
		
	});
	
	$('body').on('click','.nation-banner',function(){
		app.open('nation.list.html','nationList',{},window.location.href,document.body.scrollTop);
	});
	$('body').on('click','.brand-list .mui-col-xs-6',function(){
		var ids = $(this).attr('data-id');
		var name = $(this).attr('data-catname');
		app.open('brandClassify.html','brandClassify',{id : ids},window.location.href,document.body.scrollTop);
		
	});
	
			  /*热销分类跳转**/
  $('body').on('click','.classcify-list .mui-col-xs-6',function(){
  	var cat_id = $(this).attr('cat_id');
  	app.open('product.list.html','product_list',{catId:cat_id},window.location.href,document.body.scrollTop);
  });
	
	$('body').on('click','.search-btn',function(){
		var ids=$('#search').val();
		if(!ids){
			layer.msg('请输入关键字');
			return false;
		}
		app.open('searchResult.html','searchResult',{key : ids},window.location.href,document.body.scrollTop);
	});
}

